package com.example.hosptialtag.controller;

import com.example.hosptialtag.pojo.Result;
import com.example.hosptialtag.pojo.Tag;
import com.example.hosptialtag.service.BindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author liuyuhao&caiang
 * @Date 2022/5/17
 */

@RestController
public class ResultController {
    @Autowired
    BindService bindService;
    @RequestMapping(value = "/getBindByPatientId", method = RequestMethod.GET)//根据bind_patient_id获取 并保证在期限内
    public Result getBindByPatientId(int bind_patient_id){
        List<Tag> list = new ArrayList<>();
        list = bindService.getBindByPatientId(bind_patient_id);
        return new Result(list);
    }
}
